package com.sailfish.springbootdemo.dao.db8;

import com.sailfish.springbootdemo.common.DB8TableName;
import com.sailfish.springbootdemo.pojo.db8.IntfFromVplWebPartdata;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IntfFromVplWebPartdataDao {
    @Insert("<script>" +
            "insert into " + DB8TableName.INTF_FROM_VPLWEB_PARTDATA+ " " +
            "( "+
            "GUID, " +
            "code, "+
            "mcode, " +
            "mpn, " +
            "manufacturer, " +
            "manufacturer_type, " +
            "comp_type, " +
            "pkg_name, " +
            "coplanarity, " +
            "weight, " +
            "assembly_type, " +
            "body_length, " +
            "body_length_tol_p, " +
            "body_length_tol_n, " +
            "body_width, " +
            "body_width_tol_p, " +
            "body_width_tol_n, " +
            "body_height, " +
            "body_height_tol_p, " +
            "body_height_tol_n, " +
            "standoff, " +
            "pth_diameter_min, " +
            "board_thickness_min, " +
            "board_thickness_max, " +
            "is_sensitive, " +
            "is_secd_reflow_drop, " +
            "bga_height_min, " +
            "orientation, " +
            "solder_tg_max, " +
            "is_glue, " +
            "unbd_thickness_min, " +
            "component_high_max, " +
            "weight_max, " +
            "high_max_vpl, " +
            "pin_high_min, " +
            "pin_high_max, " +
            "is_tht_power, " +
            "is_tht_capcitor, " +
            "is_little_retentionforce " +
            ")"+
            "values "+
            "<foreach collection=\"entities\" item=\"entity\" separator=\",\">" +
            "(" +
            "#{entity.GUID}, " +
            "#{entity.code}, " +
            "#{entity.mcode}, " +
            "#{entity.mpn}, " +
            "#{entity.manufacturer}, " +
            "#{entity.manufacturer_type}, " +
            "#{entity.comp_type}, " +
            "#{entity.pkg_name}, " +
            "#{entity.coplanarity}, " +
            "#{entity.weight}, " +
            "#{entity.assembly_type}, " +
            "#{entity.body_length}, " +
            "#{entity.body_length_tol_p}, " +
            "#{entity.body_length_tol_n}, " +
            "#{entity.body_width}, " +
            "#{entity.body_width_tol_p}, " +
            "#{entity.body_width_tol_n}, " +
            "#{entity.body_height}, " +
            "#{entity.body_height_tol_p}, " +
            "#{entity.body_height_tol_n}, " +
            "#{entity.standoff}, " +
            "#{entity.pth_diameter_min}, " +
            "#{entity.board_thickness_min}, " +
            "#{entity.board_thickness_max}, " +
            "#{entity.is_sensitive}, " +
            "#{entity.is_secd_reflow_drop}, " +
            "#{entity.bga_height_min}, " +
            "#{entity.orientation}, " +
            "#{entity.solder_tg_max}, " +
            "#{entity.is_glue}, " +
            "#{entity.unbd_thickness_min}, " +
            "#{entity.component_high_max}, " +
            "#{entity.weight_max}, " +
            "#{entity.high_max_vpl}, " +
            "#{entity.pin_high_min}, " +
            "#{entity.pin_high_max}, " +
            "#{entity.is_tht_power}, " +
            "#{entity.is_tht_capcitor}, " +
            "#{entity.is_little_retentionforce}" +
            ")"+
            "</foreach>"+
            "</script>"
    )
    Integer insertIntfFromVplWebPartdataBatch(@Param("entities") List<IntfFromVplWebPartdata> entities);

}
